# Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.15)
project(video_common)

find_package(common)
collector_create (PROJECT_LIB_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}")
collector_create (PROJECT_LIB_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}")
include_directories(${CMAKE_BINARY_DIR}/include)
collect (PROJECT_LIB_SOURCES xvidc.c)
collect (PROJECT_LIB_HEADERS xvidc.h)
collect (PROJECT_LIB_HEADERS xvidc_cea861.h)
collect (PROJECT_LIB_SOURCES xvidc_edid.c)
collect (PROJECT_LIB_HEADERS xvidc_edid.h)
collect (PROJECT_LIB_SOURCES xvidc_edid_ext.c)
collect (PROJECT_LIB_HEADERS xvidc_edid_ext.h)
collect (PROJECT_LIB_SOURCES xvidc_parse_edid.c)
collect (PROJECT_LIB_SOURCES xvidc_timings_table.c)
collector_list (_sources PROJECT_LIB_SOURCES)
collector_list (_headers PROJECT_LIB_HEADERS)
file(COPY ${_headers} DESTINATION ${CMAKE_BINARY_DIR}/include)
add_library(video_common STATIC ${_sources})
set_target_properties(video_common PROPERTIES LINKER_LANGUAGE C)
